package com.gitee.order.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * name 指定调用rest接口所对应的服务名
 * path 指定调用rest接口所在的StockController指定的@RequestMapping
 */
@FeignClient(name = "stock-mall", path = "stock")
public interface StockFeignService {

    @RequestMapping("/reduct")
    String reduct();

    @RequestMapping("/reduct/{skuId}/{num}")
    String reduct(@PathVariable("skuId") Long skuId, @PathVariable("num") Integer num);
}
